<template>
	<!-- 查看核销码 -->
	<view class="container">
		<!-- 待到店使用部分 -->
		<view class="header">
			<view class="header-icon">
				<image src="../../static/logo.png" mode=""></image>
			</view>
			<view class="header-text">待到店使用</view>
		</view>
		<!-- 预约时间部分 -->
		<view class="appointment-time">
			<view class="time-text">预约时间：2024-05-22 13:30</view>
		</view>
		<view class="info">
			<!-- 服务项目部分 -->
			<view class="service-item">
				<image class="service-image" src="../../static/logo.png"></image>
				<view class="service-info">
					<view class="service-title">
						按摩 脊柱侧弯 正骨调理
						<text class="doctor-tag">鲍医生</text>
					</view>
					<view class="service-details">预约时间：2024-05-22 13:30</view>
					<view class="service-duration">服务时长：60分钟</view>
					<view class="service-price">
						<text class="_text">￥</text><text class="__text">598</text>
					</view>
				</view>
			</view>
			<!-- 核销码部分 -->
			<view class="verification-code">
				<view class="verification-title">项目核销码:</view>
				<view class="verification-number">0151 8764 8743</view>
				<view class="cancel-btn" @click="cancel">取消订单</view>
			</view>
		</view>
		<!-- 联系商家部分 -->
		<view class="contact-seller">
			<view class="contact-seller-img">
				<image src="../../static/查看核销码_slices/联系商家.png" mode=""></image>
			</view>
			<view class="contact-seller-button">联系商家</view>
		</view>
		<!-- 支付金额部分 -->
		<view class="payment-amount">
			<view class="payment-text">支付金额</view>
			<view class="payment-price">
				<text class="_text">￥</text><text class="__text">598</text>
			</view>
		</view>
		<u-popup :show="show" :round="20" mode="center" @close="close" @open="open">
			<view class="popup">
				<view class="popup-text">
					是否取消订单
				</view>
				<view class="popup-btn">
					<view class="popup-btn-left">
						取消
					</view>
					<view class="popup-btn-right">
						确定
					</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 数据部分可以根据实际情况调整
				show: false
			};
		},
		methods: {
			// 方法部分可以根据实际情况调整
			cancel(){
				this.show=true
			},
			open() {
				console.log('open');
			},
			close() {
				this.show = false
				console.log('close');
			}
		},
	};
</script>

<style lang="less" scoped>
	.container {
		background-color: #f5f5f5;
	}
	.popup{
		width: 560rpx;
		height: 280rpx;
		background: #FFFFFF;
		display: flex;
		border-radius: 20rpx;
		position: relative;
		.popup-text{
			margin-top: 74rpx;
			width: 100%;
			height: 44rpx;
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 32rpx;
			color: #647361;
			line-height: 44rpx;
			text-align: center;
			font-style: normal;
		}
		.popup-btn{
			position: absolute;
			display: flex;
			bottom: 0;
			left: 0;
			.popup-btn-left{
				width: 281rpx;
				height: 84rpx;
				line-height: 84rpx;
				text-align: center;
				background: #F7F6F6;
				border-radius: 0 0 0 20rpx;
			}
			.popup-btn-right{
				width: 281rpx;
				height: 84rpx;
				background: #C19C55;
				line-height: 84rpx;
				text-align: center;
				border-radius: 0 0 20rpx 0;
			}
		}
	}
	.header {
		display: flex;
		color: #000000;
		margin-top: 46rpx;
	}

	.header-icon {
		width: 60rpx;
		height: 60rpx;
		margin-left: 32rpx;
		margin-right: 26rpx;
		margin-bottom: 32rpx;

		image {
			width: 60rpx;
			height: 60rpx;
		}
	}

	.header-text {
		font-weight: 500;
		font-size: 44rpx;
		color: #000000;
		margin-left: 26rpx;
	}

	.section {
		margin-top: 20rpx;
		padding: 20rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
	}

	.appointment-time .time-text {
		font-size: 28rpx;
		color: #666666;
		margin-left: 32rpx;
		margin-bottom: 46rpx;
	}

	.service-item {
		display: flex;
		border-bottom: 1rpx dashed #D0D7B5;
	}

	.info {
		width: 706rpx;
		height: 730rpx;
		background: #FFFFFF;
		padding: 0 22rpx;
		margin-left: 22rpx;
	}

	.service-image {
		width: 172rpx;
		height: 172rpx;
		border-radius: 10rpx;
		margin-top: 28rpx;
		margin-left: 24rpx;
		margin-right: 20rpx;
	}

	.service-info {
		flex: 1;
	}

	.service-title {
		height: 28rpx;
		font-family: SourceHanSansCN, SourceHanSansCN;
		font-weight: 500;
		font-size: 28rpx;
		color: #202022;
		line-height: 42rpx;
		text-align: left;
		font-style: normal;
		display: flex;
		margin-top: 32rpx;
		margin-bottom: 24rpx;
	}

	.doctor-tag {
		width: 120rpx;
		height: 34rpx;
		background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #EAD4B1 100%);
		border-radius: 6rpx;
		padding-left: 10rpx;
		font-weight: 400;
		font-size: 24rpx;
		line-height: 34rpx;
		color: #9F918B;
		margin-top: 6rpx;
		margin-left: 14rpx;
	}

	.service-details,
	.service-duration {
		height: 22rpx;
		font-family: SourceHanSansCN, SourceHanSansCN;
		font-weight: 400;
		font-size: 22rpx;
		color: #989AA2;
		line-height: 34rpx;
		text-align: left;
		font-style: normal;
		margin-bottom: 20rpx;
	}

	.service-price {
		margin-bottom: 42rpx;

		._text {
			font-size: 20rpx;
			color: #C19C55;
		}

		.__text {
			font-size: 40rpx;
			color: #C19C55;
		}
	}

	.verification-code {
		text-align: center;
		padding-top: 20rpx;
	}

	.verification-title {
		height: 48rpx;
		font-family: PingFangSC, PingFang SC;
		font-weight: 400;
		font-size: 34rpx;
		color: #000000;
		line-height: 48rpx;
		text-align: center;
		font-style: normal;
		margin-top: 86rpx;
	}

	.verification-number {
		height: 76rpx;
		font-family: OPPOSans, OPPOSans;
		font-weight: normal;
		font-size: 48rpx;
		color: #000000;
		line-height: 76rpx;
		text-align: center;
		font-style: normal;
		margin-top: 46rpx;
	}

	.cancel-btn {
		margin: auto;
		margin-top: 114rpx;
		width: 176rpx;
		height: 60rpx;
		border-radius: 30rpx;
		border: 2rpx solid #979797;
		line-height: 60rpx;
		text-align: center;
	}

	.contact-seller {
		width: 750rpx;
		height: 90rpx;
		background: #FFFFFF;
		display: flex;
		text-align: center;
		line-height: 90rpx;
		margin-top: 46rpx;
		margin-bottom: 32rpx;

		.contact-seller-img {
			margin-left: 296rpx;
			margin-top: 28rpx;
			margin-right: 6rpx;
			width: 34rpx;
			height: 34rpx;

			image {
				width: 34rpx;
				height: 34rpx;
			}
		}
	}

	.contact-seller-button {
		height: 44rpx;
		text-align: center;
		font-family: PingFangSC, PingFang SC;
		font-weight: 500;
		font-size: 32rpx;
		color: #C19C55;
		text-align: left;
		font-style: normal;
	}

	.payment-amount {
		display: flex;
		width: 750rpx;
		height: 90rpx;
		background: #FFFFFF;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx;
		background-color: #ffffff;

		.payment-price {
			._text {
				font-size: 20rpx;
				color: #C19C55;
			}

			.__text {
				font-size: 40rpx;
				color: #C19C55;
			}
		}

	}

	.payment-text {
		width: 114rpx;
		height: 32rpx;
		font-family: SourceHanSansCN, SourceHanSansCN;
		font-weight: 400;
		font-size: 28rpx;
		color: #979797;
		line-height: 32rpx;
		text-align: left;
		font-style: normal;
	}
</style>